package com.sanley.coronavirus.service;

import com.sanley.coronavirus.bo.UserBO;
import com.sanley.coronavirus.entity.User;
import org.springframework.security.core.authority.SimpleGrantedAuthority;

import java.util.List;

public interface UserService {
    //根据账号查找用户
    public User findByUsername(String username);

    //添加用户
    public void addUser(User user);

    //删除用户
    public void deleteUser(int id);

    //查找所有用户
    public List<User> findAll(int page, int size,String keyword);

    //添加普通用户
    public void addUserRole(int id);

    //为账号添加超级管理者权限
    public void addAdminRole(int id);

    /**
     * 登出
     *
     * @param username
     */
    Boolean logout(String username);

    Boolean addOneUser(UserBO userBO);

    User getUserInfo(String username);

    List<SimpleGrantedAuthority> getAuthorityByUsername(String username);

}
